//
//  ViewController.swift
//  18.7 userDefault
//
//  Created by 李煜 on 2024/6/26.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        let defaults = UserDefaults.standard
        defaults.set("opened", forKey: "firstStart")
        print(URL.documentsDirectory)
        
    }
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        super.touchesBegan(touches, with: event)
        
        let ud = UserDefaults.standard
        ud.string(forKey: "firstStart")
    }

}

